home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #14 / Monster Media No. 14 (April 1996) (Monster Media, Inc.).ISO / prog_d / oleauttr.zip / WHATSNEW.TXT < prev    next >
Text File  |  1996-01-04  |  5KB  |  100 lines

  1.     *******************************************************************
  2.     Overview and discussion of features added to TOLEAutoClient V1.1
  3.     *******************************************************************
  4.  
  5. *********************************
  6. IMPROVED ERROR/EXCEPTION HANDLING
  7. *********************************
  8.  
  9.    Messages displayed for exceptions raised while attempting to
  10. start up a server have been improved to be more descriptive,
  11. and additional error code information is available for OLE method
  12. calls and property accesses.  You can also handle failures of
  13. method calls and property accesses via Delphi's exception mechanism.
  14. Refer to the section of OLEAUTO.TXT concerning error handling for
  15. a full discussion of the error information available and for
  16. an illustration of exception-based method failure handling.  Also
  17. see OLEAUTO.INT for definitions of the relevant error code values
  18. and of their type, which is HRESULT.
  19.  
  20. **********************************
  21. NEW SUPPORT FOR IN-PROCESS SERVERS
  22. **********************************
  23.  
  24.    This release allows you to control OLE Automation servers that
  25. are implemented as 16-bit DLLs (i.e., 16-bit in-process servers),
  26. in addition to both 16-bit and 32-bit .EXE servers ("local" servers).
  27. You don't need to do anything special to control such servers, since
  28. the CreateObject constructor for TOleObject will automatically try
  29. to start up the server as a local (.EXE) server and if that fails
  30. will then try to start it as an in-process (.DLL) server.
  31.  
  32.    However, to avoid the slight speed penalty associated with this
  33. two-step process, you can use the alternative constructor
  34. CreateInProcessObject(ProgID : String) for your mirror class
  35. derived from TOleObject.  This constructor simply attempts to
  36. activate the server as an in-process server if possible.  If
  37. you are sure your server is an in-process server then using
  38. CreateInProcessObject instead of CreateObject will be faster.
  39.  
  40.    If your 16-bit Delphi application is to run under Windows 95,
  41. it can control local servers (i.e., one implemented as an
  42. .EXE) regardless of whether the server is implemented as a 16-bit
  43. or a 32-bit application.  This is thanks to the Windows OLE
  44. mechanism.  However, it will not be able to control a 32-bit
  45. in-process server (that is, one implemented as a 32-bit .DLL);
  46. this limitation is also a result of the architecture of 32-bit
  47. Windows.
  48.  
  49.    No sample in-process server is supplied with this component,
  50. since controlling one presents no particular difficulties.
  51. Although you cannot readily write an in-process server in 16-bit
  52. Delphi (or an .EXE server either, for that matter), other
  53. compilers and languages do support this, and in-process servers
  54. generally result in a faster implementation.  The most widely-
  55. available commercial in-process servers are the ones supplied by
  56. Microsoft that implement versions 2.5 and 3.0 of the Jet (TM)
  57. database engine.  Regrettably, however, Jet 3.0 uses 32-bit
  58. technology and Jet 2.5 contains internal logic that generates
  59. an E_ACCESSDENIED error when you attempt to access any
  60. meaningful properties of the server identified by the
  61. DAO.DBEngine ProgID, so this component doesn't provide a
  62. way to communicate with Microsoft Access (TM) databases.
  63.  
  64. **********************************
  65. CONTROLLING INSTANCES OF SERVERS
  66. THAT ARE ALREADY ACTIVE & RUNNING
  67. **********************************
  68.  
  69.    There are situations in which you may want to control
  70. OLE Automation servers that are already running, either
  71. as separate applications or as OLE server applications
  72. inside a Delphi TOLEContainer component.  This version
  73. of TOLEAutoClient allows you to do so.  In order to
  74. "hook into" a running instance of a server, instead of
  75. using the CreateObject constructor for your mirror class
  76. derived from TOLEObject you use the new alternative
  77. constructor GetObject(ProgID : String).  This constructor
  78. will locate a running instance of the server, if there
  79. is one, and enable your mirror class object to control it.
  80. ***NOTE 1***:  Microsoft Word (versions 6.0 and 7.0) operates
  81. differently from most OLE Automation servers in this regard.
  82. Calling GetObject('word.basic') will not work to activate an
  83. already-running instance of Word -- this is a documented
  84. "feature" of Word.  However, if you simply use the
  85. CreateObject('word.basic') constructor instead, then if an
  86. instance of Word is already running the Windows OLE subsystem
  87. will automatically locate one such instance and you will be
  88. able to control it.
  89.  
  90.    Refer to the accompanying sample application XLOLE5.ZIP
  91. for an illustration of the use of GetObject.
  92. ***NOTE 2***:  The XLOLE5 example WILL NOT WORK if you are
  93. running Excel 7 (the 32-bit Office 95 application) under
  94. Windows 95.  The technical reason for this is that the
  95. TOLEObject.GetObject constructor uses the Windows GetActiveObject
  96. API call internally in order to "hook into" a running instance,
  97. and this API does not work correctly for 32-bit servers when
  98. called from 16-bit applications.  This limitation is a "feature"
  99. of Windows 95.
  100.